// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.IndexManagement;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.UpdatedDataStreamMappingsConverter))]
public sealed partial class UpdatedDataStreamMappings
{
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	public UpdatedDataStreamMappings(bool appliedToDataStream, string name)
	{
		AppliedToDataStream = appliedToDataStream;
		Name = name;
	}
#if NET7_0_OR_GREATER
	public UpdatedDataStreamMappings()
	{
	}
#endif
#if !NET7_0_OR_GREATER
	[System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")]
	public UpdatedDataStreamMappings()
	{
	}
#endif
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	internal UpdatedDataStreamMappings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel)
	{
		_ = sentinel;
	}

	/// <summary>
	/// <para>
	/// If the mappings were successfully applied to the data stream (or would have been, if running in <c>dry_run</c>
	/// mode), it is <c>true</c>. If an error occurred, it is <c>false</c>.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	bool AppliedToDataStream { get; set; }

	/// <summary>
	/// <para>
	/// The mappings that are effective on this data stream, taking into account the mappings from the matching index
	/// template and the mappings specific to this data stream.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? EffectiveMappings { get; set; }

	/// <summary>
	/// <para>
	/// A message explaining why the mappings could not be applied to the data stream.
	/// </para>
	/// </summary>
	public string? Error { get; set; }

	/// <summary>
	/// <para>
	/// The mappings that are specfic to this data stream that will override any mappings from the matching index template.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; set; }

	/// <summary>
	/// <para>
	/// The data stream name.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	string Name { get; set; }
}